<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateMapNationalUniversitiesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('map_national_universities', function (Blueprint $table) {
            $table->id();

            $table->string('province', 20)->default('')->comment('省份');
            $table->string('city', 20)->default('')->comment('城市');
            $table->string('district', 20)->default('')->comment('区域');
            $table->string('name', 255)->default('')->comment('院校名称');
            $table->string('startData', 20)->default('')->comment('建校时间');
            $table->string('attachedTo', 50)->default('')->comment('隶属于');
            $table->string('project985', 10)->default('')->comment('985工程');
            $table->string('project211', 10)->default('')->comment('211工程');
            $table->string('doubleFirstClass', 10)->default('')->comment('双一流');
            $table->string('strongBasis', 10)->default('')->comment('强基');
            $table->unsignedInteger('nationalKeyDiscipline')->default(0)->comment('国家重点学科');
            $table->unsignedInteger('master')->default(0)->comment('硕士点');
            $table->unsignedInteger('doctoral')->default(0)->comment('博士点');
            $table->unsignedInteger('KeyLaboratory')->default(0)->comment('重点实验室');
            $table->unsignedInteger('space')->default(0)->comment('占地面积(亩)');
            $table->string('schoolType', 20)->default('')->comment('院校类型');
            $table->string('educationType', 20)->default('')->comment('办学类型');
            $table->string('educationNature', 20)->default('')->comment('办学性质');
            $table->string('email', 255)->default('')->comment('电子邮箱');
            $table->string('address', 255)->default('')->comment('地址');
            $table->string('website', 255)->default('')->comment('官方网址');
            $table->string('tel', 255)->default('')->comment('官方电话');
            $table->string('lon', 255)->default('')->comment('经度');
            $table->string('lat', 255)->default('')->comment('纬度');
            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('createdByUid')->default(0)->comment('创建人');
            $table->unsignedInteger('updatedAt')->default(0)->comment('修改时间');
            $table->unsignedInteger('updatedByUid')->default(0)->comment('修改人');
            $table->collation = 'utf8mb4_general_ci';
            $table->comment   = '全国高校信息';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('map_national_universities');
    }
}
